import request from '@/utils/request'

// 查询标准规范实施列表
export function listSimp(query) {
  return request({
    url: '/standard/simp/list',
    method: 'get',
    params: query
  })
}

// 查询标准规范实施详细
export function getSimp(sid) {
  return request({
    url: '/standard/simp/' + sid,
    method: 'get'
  })
}

// 新增标准规范实施
export function addSimp(data) {
  return request({
    url: '/standard/simp',
    method: 'post',
    data: data
  })
}

// 修改标准规范实施
export function updateSimp(data) {
  return request({
    url: '/standard/simp',
    method: 'put',
    data: data
  })
}

// 删除标准规范实施
export function delSimp(sid) {
  return request({
    url: '/standard/simp/' + sid,
    method: 'delete'
  })
}

// 导出标准规范实施
export function exportSimp(query) {
  return request({
    url: '/standard/simp/export',
    method: 'get',
    params: query
  })
}


//====================================== private start ===============================================

// 查询标准规范附件
export function getUploadFiles(sid) {
  return request({
    url: '/standard/simp/uploadfiles/' + sid,
    method: 'get'
  })
}

// 附件上传新增
export function addUploadFile(data) {
  return request({
    url: '/standard/simp/attachment/add',
    method: 'post',
    data: data
  })
}

// 附件上传修改
export function updateUploadFile(data) {
  return request({
    url: '/standard/simp/attachment/update',
    method: 'post',
    data: data
  })
}

// 附件上传删除
export function delUploadFile(data) {
  return request({
    url: '/standard/simp/attachment/delete',
    method: 'post',
    data: data
  })
}

//====================================== private end ===============================================
